package com.java.zhuiyun.api.fuzzy_query.service.impl;

import com.java.zhuiyun.api.fuzzy_query.entity.FuzzQuery;
import com.java.zhuiyun.api.fuzzy_query.mapper.FuzzyQueryMapper;
import com.java.zhuiyun.api.fuzzy_query.service.FuzzyQueryService;
import com.java.zhuiyun.common.response.CommonResult;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @ClassName FuzzyQueryServiceImpl
 * @Description TODO
 * @Author WX
 * @Date 2023/8/24 16:29
 **/
@Service
public class FuzzyQueryServiceImpl implements FuzzyQueryService {
    @Autowired
    private FuzzyQueryMapper fuzzyQueryMapper;

    /*
     * @Author WX
     * @Description 通过值查询
     * @Date 2023/8/24 16:31
     * @Return
     * @param searchValue
     */
    @Override
    public List<FuzzQuery> makeBackendRequestValue(String searchValue) {
        return fuzzyQueryMapper.makeBackendRequestValue(searchValue);
    }

    /*
     * @Author WX
     * @Description 通过id查询
     * @Date 2023/8/24 16:31
     * @Return
     * @param tiaoId
     */
    @Override
    public List<FuzzQuery> makeBackendRequestTiaoId(Integer tiaoId) {
        return fuzzyQueryMapper.makeBackendRequestTiaoId(tiaoId);
    }
    /*
     * @Author WX
     * @Description 查询字典表对应的分类名称
     * @Date 2023/8/24 21:21
     * @Return
     * @param tiaoId
     */
    @Override
    public String makeQueryDict(Integer tiaoId) {
        String dictName = fuzzyQueryMapper.makeQueryDict(tiaoId);
        return dictName;
    }
}
